<?php
include_once("../../config.php");
include "../../coresection/connection.php";
$plate=select_one_line_all_items($table_Prefix."plate","mid = 'location'");
?>


<?
//用来判断当前系统属于什么板块
$system_part = $plate['mid'];
include_once("detail-list-function.php");
?>




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <?php include_once(ROOT_PATH_.'/controlbase/modules/head.php'); ?>
</head>

<body>





<?php



$new_nid      = addslashes($_REQUEST['nid']);
$new_name      = addslashes($_REQUEST['name']);
$new_status    = addslashes($_REQUEST['status']);
$new_builddate = addslashes($_REQUEST['builddate']);
$new_phone     = addslashes($_REQUEST['phone']);
$new_location  = addslashes($_REQUEST['location']);
$new_status    = addslashes($_REQUEST['status']);
$new_principal = addslashes($_REQUEST['principal']);
$new_tag       = addslashes($_REQUEST['tag']);
$new_remark    = addslashes($_REQUEST['remark']);
$new_authur    = addslashes($_SESSION['username']);





//设置需要搜索的表格的前缀后缀
$table_Suffix = "location";
$table = $table_Prefix . $table_Suffix;
//设置需要搜索的表格的前缀后缀



$sql = "update $table SET
name= '$new_name',
status= '$new_status',
authur= '$new_authur',
builddate= '$new_builddate',
phone= '$new_phone',
location= '$new_location',
principal= '$new_principal',
tag= '$new_tag',
remark= '$new_remark'

where nid=$new_nid";

$query = mysql_query($sql) or die ('添加数据失败！！');


mysql_close($con);


?>





<script type="text/javascript">
    alert("输入信息已保存，点击确认返回继续操作.");
    document.location.href = "detail-list.php?nav-itemed=department";
</script>
</body>